Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate ostracon #317

Merged
merged 15 commits into from
Sep 10, 2021
Merged

feat: integrate ostracon #317

merged 15 commits into from
Sep 10, 2021

Conversation

egonspace
Copy link

@egonspace egonspace commented Sep 6, 2021

Description

Integrated ostracon.

  • applied voter set concept
  • added priv_key_type configuration
  • fixed some Tendermint name to Ostracon (but not all). I'll make new PR removing Tendermint name from entire lfb.
  • disabled arm, arm64 building from github action because bls library failed in building. I left TODO comment. We can fix after bls module would be deleted. I fixed it.

Main changed

Most of the files changed are for the ostracon name change.
Important changes are summarized below.

PrivKeyType

client/flags/flags.go
server/start.go 
testutil/network/util.go
x/genutil/client/cli/collect.go
x/genutil/client/cli/init.go
x/genutil/client/cli/init_test.go
x/genutil/utils.go

VRFProof interface

crypto/ledger/ledger_secp256k1.go 
x/ibc/testing/mock/privval.go

lint error

x/bank/simulation/params.go
x/bank/types/balance.go
x/ibc/applications/transfer/simulation/params.go
x/wasm/types/types_test.go

VotingPower (abci interface changed)

x/distribution/abci.go
x/distribution/keeper/allocation.go
x/distribution/keeper/allocation_test.go
x/simulation/mock_ostracon.go
x/slashing/abci_test.go

VoterSet concept

x/ibc/core/02-client/client/utils/utils.go
x/ibc/core/02-client/keeper/client_test.go
x/ibc/core/02-client/keeper/keeper_test.go
x/ibc/core/02-client/types/genesis_test.go
x/ibc/core/02-client/types/msgs_test.go
x/ibc/core/genesis_test.go
x/ibc/testing/chain.go
x/ibc/testing/chain_test.go

fix arm build failure

.github/workflows/test.yml

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@egonspace egonspace added this to the Ebony launch milestone Sep 6, 2021
@egonspace egonspace self-assigned this Sep 6, 2021
@codecov
Copy link

codecov bot commented Sep 6, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@4952956). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #317   +/-   ##
=======================================
  Coverage        ?   53.16%           
=======================================
  Files           ?      642           
  Lines           ?    47460           
  Branches        ?        0           
=======================================
  Hits            ?    25230           
  Misses          ?    19366           
  Partials        ?     2864           

@@ -61,7 +61,7 @@ func StatusCommand() *cobra.Command {
ValidatorInfo: validatorInfo{
Address: status.ValidatorInfo.Address,
PubKey: pk,
VotingPower: status.ValidatorInfo.VotingPower,
VotingPower: status.ValidatorInfo.StakingPower,
Copy link
Author

@egonspace egonspace Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ValidatorInfo.VotingPower is changed to ValidatorInfo.StakingPower by Finschia/ostracon@50b4e78#diff-18b278f1fcf823eee4511186b774e4d281c1274b2505685d59aa85f001c3e766

@egonspace egonspace merged commit 84db942 into Finschia:main Sep 10, 2021
iproudhon pushed a commit that referenced this pull request Sep 10, 2021
* fix: treat addresses as strings

* fix: compile errors, test failures

* fix: works-1

* feat: integrate ostracon

* fix: bump up ostracon

* fix: lint error

* fix: bump up ostracon

* fix: self review

* fix: modify changelog

* fix: disable arm building

* fix: bls build failure on arm

* fix: bls build failure on arm

* fix: bls build failure on arm
iproudhon added a commit that referenced this pull request Sep 10, 2021
…320)

* perf: internal objects optimization (BaseAccount, Balance & Supply)

* replaced cdc.(Un)MarshalInterface() with protobuf (Un)Marshal for
  internal objects: BaseAccount, Balance & Supply
* PubKey in BaseAccount has three seperate entries for publick keys to
  avoid MarshalInterface.
* custom json marshaler for BaseAccount to show a single pub key for
  json compatibility

* feat: integrate ostracon (#317)

* fix: treat addresses as strings

* fix: compile errors, test failures

* fix: works-1

* feat: integrate ostracon

* fix: bump up ostracon

* fix: lint error

* fix: bump up ostracon

* fix: self review

* fix: modify changelog

* fix: disable arm building

* fix: bls build failure on arm

* fix: bls build failure on arm

* fix: bls build failure on arm

* docs: modify changelog

* fix: apply comment

Co-authored-by: Woosang Son <woosang.son@linecorp.com>
@@ -50,7 +50,7 @@ func (b Balance) Validate() error {
}

// sort the coins post validation
b.Coins = b.Coins.Sort()
b.Coins.Sort()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor. This line has no effect.

Copy link
Contributor

@whylee259 whylee259 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants